package com.ghca.myinfo3.system.mapper;

import com.ghca.myinfo3.system.entity.Permission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by Administrator on 2016/12/22.
 */
@Mapper
public interface PermissionMapper {

    @Select("select * from permission p inner join role_permission r_p on p.id = r_p.permission_id where r_p.role_id = #{roleId}")
    List<Permission> selectByRoleId(@Param("roleId") Integer roleId);
}
